package com.tjsiqi.controller;

import com.tjsiqi.Vo.OutJbzCountVo;
import com.tjsiqi.common.JsonData;
import com.tjsiqi.service.SysUserService;
import com.tjsiqi.service.WebUserControlService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

@Controller
@RequestMapping("/load")
public class SysLoadNewsCount {
    @Resource
    private SysUserService sysUserService;

    @Resource
    WebUserControlService webUserControlService;

    //加载新注册用户数
    @RequestMapping("/getNewUserCount.json")
    @ResponseBody
    public JsonData getNewUserCount() {
        int NewUserCount;
         NewUserCount = sysUserService.getNewUserCount();
         System.out.println(NewUserCount);
        return JsonData.success(NewUserCount);
    }

//    查询过期搅拌站
    @RequestMapping("/getOutJbzCount.json")
    @ResponseBody
    public JsonData getOutJbzCount() {
        OutJbzCountVo outJbzCountVo = new OutJbzCountVo();
        outJbzCountVo = webUserControlService.getOutJbzCount();
        System.out.println(outJbzCountVo);
        return JsonData.success(outJbzCountVo);
    }
}
